[Artist] 아티스트 찜하기#110
Merged
Merged
Conversation
⭐ JaCoCo CoverageLine Coverage: 5.40% 📄 Coverage DetailsOverall Line Coverage: 5.37% (127 covered / 2364 lines) Package Summary (lowest first)
Lowest Covered Classes (Top 20)
Changed Classes (from this PR)
🔗 Full HTML report: See artifact jacoco-full-html on this run → https://github.com/prgrms-web-devcourse-final-project/WEB7_9_codecrete_BE/actions/runs/20287662726 |
larama-C
reviewed
Dec 17, 2025
| private Artist artist; | ||
|
|
||
| public ArtistLike(Artist artist, User user) { | ||
| this.createdDate = LocalDateTime.now(); |
Collaborator
There was a problem hiding this comment.
Auditing 사용중이라서 위에 칼럼쪽에 createdate 어노테이션 사용하시면 자동으로 주입될 것 같습니다!
Creamcheesepie
approved these changes
Dec 17, 2025
| public void deleteLikeArtist(Long artistId) { | ||
| User user = rq.getUser(); | ||
| Artist artist = artistRepository.findById(artistId) | ||
| .orElseThrow(() -> new BusinessException(ArtistErrorCode.ARTIST_NOT_FOUND)); |
Collaborator
There was a problem hiding this comment.
artist 찾아오는 부분은 좋아요 / 좋아요 삭제 부분에서 공통적으로 처리되는 부분이니 메소드로 빼도 좋을 것 같습니다.
- 이미 알고 있는 미세팁일 수 있지만 해당 부분 드래그하고 export->method 하면 알아서 추출되고 이름만 쳐주면 적용됩니다(중복부분도 같이 바꿔주더라고요)
Collaborator
Author
There was a problem hiding this comment.
넵 수정하겠습니다!! 팁 알려주셔서 감사합니당
Collaborator
There was a problem hiding this comment.
artist 찾아오는 부분은 좋아요 / 좋아요 삭제 부분에서 공통적으로 처리되는 부분이니 메소드로 빼도 좋을 것 같습니다.
- 이미 알고 있는 미세팁일 수 있지만 해당 부분 드래그하고 export->method 하면 알아서 추출되고 이름만 쳐주면 적용됩니다(중복부분도 같이 바꿔주더라고요)
저도 꿀팁 하나 얻어갑니다!
heygeeji
approved these changes
Dec 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 관련 이슈
🚀 PR 개요
📌 변경 사항
🧪 테스트 방법
포스트맨으로 테스트하였습니다.
📸 스크린샷 (선택)
DB에 저장이 됩니다.
아티스트 테이블에서 like_count 수가 감소하고
아티스트 찜 DB에서도 삭제되는 것을 확인할 수 있습니다.
제가 ArtistLike 테이블에서 user_id 칼럼을 genre_id 라고 매핑해놨더라고요... 그래서 DB 최신화 한 번씩만 해주시면 감사하겠습니다!!
((또한 스크린샷은 칼럼 변경하기 전에 찍은거라서... genre_id 가 user_id 라고 봐주시면 됩니다 ㅜㅜ))